package com.yujistu.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.yujistu.R;

/**
 * Created by S3YOGA on 2015/11/4.
 */
public class SettingsActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_settings);

        InitViews();
    }

    ImageView  backIV;
    TextView   titleTV;
    private void InitViews() {
        backIV = (ImageView)findViewById(R.id.backIv);
        backIV.setVisibility(View.VISIBLE);
        backIV.setOnClickListener(mOnClickListener);
        titleTV = (TextView)findViewById(R.id.tv_title_title);
        titleTV.setVisibility(View.VISIBLE);
        titleTV.setText(R.string.settings);

        findViewById(R.id.remind).setOnClickListener(mOnClickListener);
        findViewById(R.id.change_passwordRL).setOnClickListener(mOnClickListener);
        findViewById(R.id.recommendedRL).setOnClickListener(mOnClickListener);
        findViewById(R.id.join_friendsRL).setOnClickListener(mOnClickListener);
        findViewById(R.id.about_usRL).setOnClickListener(mOnClickListener);
        findViewById(R.id.customer_service_hotlineRL).setOnClickListener(mOnClickListener);
    }

    private View.OnClickListener  mOnClickListener;

    {
        mOnClickListener = new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                switch (v.getId()) {
                    case R.id.backIv:
                        finish();
                        break;
                    case R.id.remind:

                        break;
                    case R.id.change_passwordRL:
                        startActivity(new Intent(SettingsActivity.this, ChangePwdActivity.class));
                        break;
                    case R.id.recommendedRL:
                        startActivity(new Intent(SettingsActivity.this, ShareActivity.class));
                        break;
                    case R.id.join_friendsRL:

                        break;
                    case R.id.about_usRL:

                        break;
                    case R.id.customer_service_hotlineRL:

                        break;
                }
            }
        };
    }

}
